Skip to main content

Passport Verification API

API Description

Objective

The Passport Verification API authenticates a user by verifying their identity details against a centralized database of passport records.

InputOutput
The name and the passport details of the customer.The outcome of comparing the input details with the information retrieved from the matching passport record.

API URL

https://ind-verify.hyperverge.co/api/verifyPassport

Overview

The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.

Authentication

You need a unique pair of application ID ( appId ) and application key (appKey) from HyperVerge to verify your identity for accessing the API.

API Request Details

Method - POST

Headers

ParameterMandatory or OptionalTypeDescriptionValid Values
content-typeMandatorystringThis parameter defines the media type for the request payload.application/json
appIdMandatorystringThe application ID shared by HyperVergeNot Applicable - this is a unique value.
appKeyMandatorystringThe application key shared by HyperVergeNot Applicable - this is a unique value.
transactionIdMandatorystringThe unique ID for the customer journey.Not Applicable - this is a unique value related to a transaction in your application.

Input

The following table provides the complete information on the parameters used in the request body for the API call.

ParameterMandatory or OptionalTypeDescription
fileNoMandatorystringThe passport reference file number.
dobMandatorystringThe date of birth of the customer.
doiMandatorystringThe date of issue of the passport.
passportNoMandatorystringThe passport number of the customer.
nameMandatorystringThe name of the customer.

Sample Request

The following code shows a standard curl request for the API.

curl --location --request POST 'https://ind-verify.hyperverge.co/api/verifyPassport' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"fileNo": "<passport_reference_file_number>",
"dob": "<Date_of_Birth>",
"doi": "<Date_of_issue>",
"passportNo": "<Passport_Number>",
"name": "<Name_on_Passport>"
}'

Success Response Sample

The following is a sample success response.

{
"status": "success",
"statusCode": "200",
"result": {
"applicationDate": "10/10/1000",
"dateOfIssue": {
"dispatchedOnFromSource": "10/10/1000",
"dateOfIssueMatch": true
},
"passportNumber": {
"passportNumberFromSource": "12345678",
"passportNumberMatch": true
},
"name": {
"nameMatch": true,
"surnameFromPassport": "SAMPLE",
"nameScore": 1,
"nameFromPassport": "SAMPLE SAMPLE"
},
"typeOfApplication": "SAMPLE"
}
}

Failure Response Sample

The following is a sample response when no matching record is found against the input parameters.

{
"status": "failure",
"statusCode": "422",
"error": "Entered id is not found in any database"
}

Error Response Sample

The following are the sample error responses for the API.

{
"status": "failure",
"statusCode": "400"
"error": "fileNo is not allowed to be empty"
}
{
"status": "failure",
"statusCode": "500",
"error": "Unexpected Server Error"
}

Error Response Details

A failure or error response contains a failure status with a relevant status code and error message. The following table lists all error responses.

Status CodeError MessageError Description
400fileNo is not allowed to be emptyThe fileNo in the request contains no value.
400passportNo is not allowed to be emptyThe passportNo is a mandatory input in the request.
400dob is requiredThe dob parameter is a mandatory input in the request.
400fileNo is requiredThe fileNo is a mandatory input in the request.
400dob must be a number of milliseconds or valid date string
500Unexpected Server ErrorThere is an issue with the service. Kindly contact the HyperVerge Team for support.
504Govt. database service unavailableThe service is currently unavailable. Kindly retry the request in some time.
Was this helpful?
Ask AIBeta
Hi! How can I help?
Ask me anything about HyperVerge products, APIs, and SDKs.
Try asking: